Copyright ã1995 by NeXT Computer, Inc.  All Rights Reserved.

NS_DEV_DOCFOR:objc_protocol:NXDraggingInfo;,NXDraggingInfo

Adopted By:	no NEXTSTEP classes

Declared In:	appkit/drag.h

Protocol Description

The NXDraggingInfo protocol declares methods that supply information about a dragging session (see the NXDraggingDestination protocol for definitions of dragging terms).  The NXDraggingInfo methods are designed to be invoked from within an object's implementation of the NXDraggingDestination protocol methods.  An NXDraggingInfo-conforming object is passed as the argument to each of the methods defined by NXDraggingDestination; it is to this object that the NXDraggingInfo messages should be sent.  The Application Kit supplies an NXDraggingInfo object automatically such that you never need to create a class that implements this protocol.

Method Types

Dragging-session information	- isDraggingSourceLocal
- draggingSource
- draggingSourceOperationMask
- draggingDestinationWindow
- draggingPasteboard
- draggingSequenceNumber
- draggingLocation

Image information	- draggedImage
- draggedImageCopy
- draggedImageLocation

Sliding the image	- slideDraggedImageTo:

Instance Methods

NS_DEV_DOCFOR:objc_method:[NXDraggingInfo-draggedImage];,draggedImage

- (NXImage *)draggedImage

Returns the NXImage object that's being dragged.  You shouldn't invoke this method after the user has released the image, nor should you free the object that this method returns.  

See also:  - draggedImageCopy, - draggedImageLocation

NS_DEV_DOCFOR:objc_method:[NXDraggingInfo-draggedImageCopy];,draggedImageCopy

- (NXImage *)draggedImageCopy

Returns a copy of the NXImage object that's being dragged.  You should only invoke this method after the user has released the image, typically from within the destination's implemenation of performDragOperation:.  You must free the NXImage when you're done with it.

See also:  - draggedImage, - draggedImageLocation

NS_DEV_DOCFOR:objc_method:[NXDraggingInfo-draggedImageLocation];,draggedImageLocation

- (NXPoint)draggedImageLocation

Returns the current location of the dragged image's origin.  The image moves in lockstep with the cursor (the position of which is given by draggingLocation) but may be positioned at some offset.  The point that's returned is reckoned in the base coordinate system of the destination object's Window.

See also:  - draggedImage, - draggingLocation

NS_DEV_DOCFOR:objc_method:[NXDraggingInfo-draggingDestinationWindow];,draggingDestinationWindow

- draggingDestinationWindow

Returns the destination object's Window.

NS_DEV_DOCFOR:objc_method:[NXDraggingInfo-draggingLocation];,draggingLocation

- (NXPoint)draggingLocation

Returns the current location of the cursor's hot spot, reckoned in the base coordinate system of the destination object's Window.

See also:  - draggedImageLocation

NS_DEV_DOCFOR:objc_method:[NXDraggingInfo-draggingPasteboard];,draggingPasteboard

- (Pasteboard *)draggingPasteboard

Returns the Pasteboard object that holds the data that the dragged image represents.

NS_DEV_DOCFOR:objc_method:[NXDraggingInfo-draggingSequenceNumber];,draggingSequenceNumber

- (int)draggingSequenceNumber

Returns an integer that uniquely identifies the current dragging session.

NS_DEV_DOCFOR:objc_method:[NXDraggingInfo-draggingSource];,draggingSource

- draggingSource

Returns the source, or ªowner,º of the dragged image.  However, this method returns nil if the source isn't in the same application as the destination.

See also:  - isDraggingSourceLocal

NS_DEV_DOCFOR:objc_method:[NXDraggingInfo-draggingSourceOperationMask];,draggingSourceOperationMask

- (NXDragOperation)draggingSourceOperationMask

Returns the dragging operation mask declared by the dragging source (through its draggingSourceOperationMaskForLocal: method).  The elements in the mask will be one or more of the following:

NX_DragOperationCopy
NX_DragOperationLink
NX_DragOperationGeneric
NX_DragOperationPrivate

If the user is holding down a modifier key during the drag, the NXDragOperation value that corresponds to the key (as shown in the table below) is AND'ed with the source's mask.

Modifier Key	NXDragOperation Value

Control	NX_DragOperationLink
Alternate	NX_DragOperationCopy
Command	NX_DragOperationGeneric

NS_DEV_DOCFOR:objc_method:[NXDraggingInfo-isDraggingSourceLocal];,isDraggingSourceLocal

- (BOOL)isDraggingSourceLocal

Returns YES if the source and destination objects are in the same application.  Otherwise returns NO.

NS_DEV_DOCFOR:objc_method:[NXDraggingInfo-slideDraggedImageTo:];,slideDraggedImageTo:

- slideDraggedImageTo:(NXPoint *)screenPoint

Causes the image to move to the given location in the screen coordinate system.  This method should only be invoked from within the destination's implementation of prepareForDragOperation:Ðin other words, after the user has released the image but before it's removed from the screen.